package com.mall.app.utils;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;

@Configuration
public class MyBatisPlusConfig {
	/**
	 * 逻辑删除插件类
	 * @return
	 */
	@Bean
	public ISqlInjector sqlInjector() {
        return new LogicSqlInjector();
    }
	@Bean
	//解决分页问题
	public PaginationInterceptor  getPaginationInterceptor(){
		return new  PaginationInterceptor();
	}
}
